﻿@namespace MudBlazor.Docs.Examples

@inject IDialogService DialogService


<MudButton @onclick="OpenDialogAsync" Variant="Variant.Filled" Color="Color.Primary">
    Open Dialog
</MudButton>

@code {

    private Task OpenDialogAsync()
    {
        var options = new DialogOptions { CloseOnEscapeKey = true };

        return DialogService.ShowAsync<DialogFocusExample_Dialog>("Last element focused", options);
    }
}
